package com.bkitmobile.kesu.android.ClassInfo;

import java.io.Serializable;
import java.util.List;

public class PlaceInfo implements Serializable {
	private List<CmtLocation> listCmt;
	private String info;
	private String creator;
	private String name;
	private String type;
	private String address;
	private int latE6;
	private int lngE6;
	private double lat;
	private double lng;
	private boolean isLike;
	private boolean isEnable;
	public PlaceInfo(List<CmtLocation> listCmt,String info,String creator
			,String name,String type,String addr,int latE6,int lngE6,boolean isLike,boolean isEnable)
	{
		this.setListCmt(listCmt);
		this.setInfo(info);
		this.setCreator(creator);
		this.name = name;
		this.type = type;
		this.setAddress(addr);
		this.latE6 = latE6;
		this.lngE6 = lngE6;
		this.isLike = isLike;
		this.isEnable = isEnable;
	}
	public PlaceInfo(String name,String type,int lat,int lng)
	{
		this.name = name;
		this.type = type;
		this.latE6 = lat;
		this.lngE6 = lng;
		this.lat = latE6/1000000.0;
		this.lng = lngE6/1000000.0;
		this.isEnable = false;
	}
	public PlaceInfo(String name,String type,String info,String addr,double lat,double lng)
	{
		this.name = name;
		this.type = type;
		this.info = info;
		this.address = addr;
		this.setLat(lat);
		this.setLng(lng);
	}
	public void enable(List<CmtLocation> lsCmt,String userCreate,String info,String addr,boolean like)
	{
		if (isEnable == true) return;
		this.listCmt = lsCmt;
		this.creator = creator;
		this.info = info;
		this.address = addr;
		this.isLike = like;
		this.isEnable = true;
	}
	public void setListCmt(List<CmtLocation> listCmt) {
		this.listCmt = listCmt;
	}
	public List<CmtLocation> getListCmt() {
		return listCmt;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	public String getInfo() {
		return info;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public String getCreator() {
		return creator;
	}
	public void addCmt(CmtLocation cmt)
	{
		listCmt.add(cmt);
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getType() {
		return type;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getAddress() {
		return address;
	}
	public void setLngE6(int lngE6) {
		this.lngE6 = lngE6;
	}
	public int getLngE6() {
		return lngE6;
	}
	public void setLatE6(int latE6) {
		this.latE6 = latE6;
	}
	public int getLatE6() {
		return latE6;
	}
	public void setLike(boolean isLike) {
		this.isLike = isLike;
	}
	public boolean isLike() {
		return isLike;
	}
	public void setEnable(boolean isEnable) {
		this.isEnable = isEnable;
	}
	public boolean isEnable() {
		return isEnable;
	}
	public void setLat(double lat) {
		this.lat = lat;
	}
	public double getLat() {
		return lat;
	}
	public void setLng(double lng) {
		this.lng = lng;
	}
	public double getLng() {
		return lng;
	}
	
}
